const pOrP = ['alipay', 'swan'].includes(process.env.TARO_ENV as string);
const defaultSubPackages = require('./sub-packages/default');
const canNangThirdHospitalSubPackages = require('./sub-packages/can-nang-third-hospital');
const nodeScriptsEnvGoal = process.env.npm_lifecycle_script?.split('--goal ')[1] || '';
// 应用版本
const appEdition = nodeScriptsEnvGoal.includes('.') ? nodeScriptsEnvGoal.split('.')[0] : 'default';
export default defineAppConfig({
  pages: ['pages/index/index', 'pages/my/index'],
  [`sub${pOrP ? 'P' : 'p'}ackages`]: {
    default: defaultSubPackages,
    hgy: defaultSubPackages,
    dev: defaultSubPackages,
    'jinhua-police-service': defaultSubPackages,
    'can-nang-third-hospital': canNangThirdHospitalSubPackages,
  }[appEdition],
  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTitleText: 'WeChat',
    navigationBarTextStyle: 'black',
  },
});
